//
//  var.h
//  test222
//
//  Created by 任文超 on 14-8-18.
//  Copyright (c) 2014年 任文超. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MBProgressHUD.h"
#import "Reachability.h"

@interface var : NSObject

#define DEBUG_APP 1

#if DEBUG_APP
#define FIX_CHECK_NET 0 // 0-不修改 1-始终有网 2-始终断网

#else
#define FIX_CHECK_NET 0

#endif

#define HEIGHT_STATUS 20
#define HEIGHT_NAV 44
#define HEIGHT_BAR 49

#define IS_4S (460 == sizeMain.height)
#define IS_5S (548 == sizeMain.height)
#define IS_6 (647 == sizeMain.height)
#define IS_6S (716 == sizeMain.height)

// color
#define COLOR_MAKE(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]

// 全局缓存
extern float verIOS;
extern CGSize sizeMain;

// read write
extern void ns_write(NSString *key, NSString *value);
extern NSString* ns_read(NSString *key);
extern int ns_readasint(NSString *key);
extern void ns_writeData(NSString *key, id value);
extern id ns_readData(NSString *key);

// alert
extern void showAlert(NSString* title, NSString* value);

// mask
extern bool isMask;
extern MBProgressHUD *mask;
extern void addMask();
extern void clearMask();
extern MBProgressHUD *promptHud;
extern void showPrompt(NSString* prompt, int right, float time);

// net
extern bool checkNet();

@end
